package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_CEM_SUBTYPE"
 *     
*/
public class CcpCemSubtype implements Serializable {

    /** identifier field */
    private String ccsGuid;

    /** nullable persistent field */
    private String ccsCode;

    /** nullable persistent field */
    private String ccsName;

    /** nullable persistent field */
    private String ccoGuid;

    /** full constructor */
    public CcpCemSubtype(String ccsGuid, String ccsCode, String ccsName, String ccoGuid) {
        this.ccsGuid = ccsGuid;
        this.ccsCode = ccsCode;
        this.ccsName = ccsName;
        this.ccoGuid = ccoGuid;
    }

    /** default constructor */
    public CcpCemSubtype() {
    }

    /** minimal constructor */
    public CcpCemSubtype(String ccsGuid) {
        this.ccsGuid = ccsGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="CCS_GUID"
     *         
     */
    public String getCcsGuid() {
        return this.ccsGuid;
    }

    public void setCcsGuid(String ccsGuid) {
        this.ccsGuid = ccsGuid;
    }

    /** 
     *            @hibernate.property
     *             column="CCS_CODE"
     *             length="2"
     *         
     */
    public String getCcsCode() {
        return this.ccsCode;
    }

    public void setCcsCode(String ccsCode) {
        this.ccsCode = ccsCode;
    }

    /** 
     *            @hibernate.property
     *             column="CCS_NAME"
     *             length="50"
     *         
     */
    public String getCcsName() {
        return this.ccsName;
    }

    public void setCcsName(String ccsName) {
        this.ccsName = ccsName;
    }

    /** 
     *            @hibernate.property
     *             column="CCO_GUID"
     *             length="32"
     *         
     */
    public String getCcoGuid() {
        return this.ccoGuid;
    }

    public void setCcoGuid(String ccoGuid) {
        this.ccoGuid = ccoGuid;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("ccsGuid", getCcsGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpCemSubtype) ) return false;
        CcpCemSubtype castOther = (CcpCemSubtype) other;
        return new EqualsBuilder()
            .append(this.getCcsGuid(), castOther.getCcsGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getCcsGuid())
            .toHashCode();
    }

}
